<?php

use think\facade\Db;
use think\migration\Seeder;

class ProvinceTableSeeder extends Seeder
{
    /**
     * Run Method.
     *
     * Write your database seeder using this method.
     *
     * More information on writing seeders is available here:
     * http://docs.phinx.org/en/latest/seeding.html
     */
    public function run()
    {
        $tempSql = $this->getSql();
        Db::query($tempSql);
    }

    protected function getSql()
    {
        return "INSERT INTO `province` (`id`, `name`, `province_code`) VALUES(1, '北京市', '110000'),(2, '天津市', '120000'),(3, '河北省', '130000'),(4, '山西省', '140000'),(5, '内蒙古自治区', '150000'),(6, '辽宁省', '210000'),(7, '吉林省', '220000'),(8, '黑龙江省', '230000'),(9, '上海市', '310000'),(10, '江苏省', '320000'),(11, '浙江省', '330000'),(12, '安徽省', '340000'),(13, '福建省', '350000'),(14, '江西省', '360000'),(15, '山东省', '370000'),(16, '河南省', '410000'),(17, '湖北省', '420000'),(18, '湖南省', '430000'),(19, '广东省', '440000'),(20, '广西壮族自治区', '450000'),(21, '海南省', '460000'),(22, '重庆市', '500000'),(23, '四川省', '510000'),(24, '贵州省', '520000'),(25, '云南省', '530000'),(26, '西藏自治区', '540000'),(27, '陕西省', '610000'),(28, '甘肃省', '620000'),(29, '青海省', '630000'),(30, '宁夏回族自治区', '640000'),(31, '新疆维吾尔自治区', '650000')";
    }
}